{template 'common/header'}
	<script type="text/javascript" src="./resource/script/jquery.zclip.min.js"></script>
	<ul class="nav nav-tabs">
		<li><a href="{php echo create_url('account/post')}">添加公众号</a></li>
		<li class="active"><a href="{php echo create_url('account/display')}">管理公众号</a></li>
	</ul>
	<div class="main">
		<div class="account">
			{loop $list $row}
			<div class="navbar-inner thead">
				<h4>
					<span class="pull-right"><a onclick="return confirm('删除帐号将同时删除全部规则及回复，确认吗？');return false;" href="{php echo create_url('account/delete', array('id' => $row['weid']))}">删除</a><a href="{php echo create_url('account/post', array('id' => $row['weid']))}">编辑</a><a href="{php echo create_url('account/switch', array('id' => $row['weid']))}">切换</a></span>
					<span class="pull-left">{$row[name]} <small>（公众平台帐号：{$row['account']}）</small></span>
				</h4>
			</div>
			<div class="tbody">
				<div class="con">
					<div class="name pull-left">公众号类型</div>
					<div class="input-append pull-left" id="api_{$row[weid]}">
						<select name="type" id="type" readonly="readonly">
							<option value="1" {if $row['type'] == 1} selected{/if}>微信公众平台</option>
							<option value="2" {if $row['type'] == 2} selected{/if}>易信公众平台</option>
						</select>
					</div>
				</div>
				<div class="con">
					<div class="name pull-left">API地址</div>
					<div class="input-append pull-left" id="api_{$row[weid]}">
						<input id="" type="text" value="{$_W['siteroot']}api.php?hash={$row['hash']}">
						<button class="btn" type="button">复制</button>
					</div>
				</div>
				<div class="con">
					<div class="name pull-left">Token</div>
					<div class="input-append pull-left" id="token_{$row[weid]}">
						<input id="" type="text" value="{$row['token']}">
						<button class="btn" type="button">复制</button>
					</div>
				</div>
			</div>
			<script>
				$(function() {
					$("#api_{$row[weid]} button").zclip({
						path:'./resource/script/ZeroClipboard.swf',
						copy:$('#api_{$row[weid]} input').val()
					});
					$("#token_{$row[weid]} button").zclip({
						path:'./resource/script/ZeroClipboard.swf',
						copy:$('#token_{$row[weid]} input').val()
					});
				});
			</script>
			{/loop}
		</div>
	</div>
{template 'common/footer'}
